﻿<UserControl x:Class="MsiCustomize.MsiProperties"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:MsiCustomize"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid Background="LightGray">
        <DockPanel LastChildFill="False">
            <Expander Header="General Settings" Background="SkyBlue" IsExpanded="True" DockPanel.Dock="Top">
                <Grid Background="#FFE0E0E0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="90"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="25"/>
                        <RowDefinition Height="25"/>
                        <RowDefinition Height="25"/>
                        <RowDefinition Height="25"/>
                    </Grid.RowDefinitions>
                    <GridSplitter Width="3" HorizontalAlignment="Right" VerticalAlignment="Stretch" />
                    <Label Grid.Column="0" Grid.Row="0" Content="Project Name:" Margin="0,1"/>
                    <TextBox Grid.Column="1" Grid.Row="0" x:Name="ProjectName" Text="{Binding ProjectName}" Margin="0,1"/>
                    <Label Grid.Column="0" Grid.Row="1" Content="Feature Name:" Margin="0,1"/>
                    <TextBox Grid.Column="1" Grid.Row="1" x:Name="FeatureName" Text="{Binding FeatureName}" Margin="0,1"/>
                    <Label Grid.Column="0" Grid.Row="2" Content="Work Folder:" Margin="0,1"/>
                    <DockPanel Grid.Column="1" Grid.Row="2" LastChildFill="True" Margin="0,1">
                        <Button Content="..." DockPanel.Dock="Right" Width="20" Click="SelectWorkingFolder"/>
                        <TextBox x:Name="WorkFolder"  Text="{Binding WorkingFolder}"/>
                    </DockPanel>
                    <Label Grid.Column="0" Grid.Row="3" Content="MSI Filename:"  Margin="0,1"/>
                    <DockPanel Grid.Column="1" Grid.Row="3" LastChildFill="True" Margin="0,1">
                        <Button Content="..." DockPanel.Dock="Right"  Width="20" Click="SelectMSIFilename"/>
                        <TextBox x:Name="MsiFilename"  Text="{Binding MsiFileName}"/>
                    </DockPanel>
                </Grid>
            </Expander>
            <Expander x:Name="MsiPropertySettings" Header="MSI Settings" Background="LightGreen" DockPanel.Dock="Top">
                <Grid>
                    <DataGrid ItemsSource="{Binding ProjectProperties}" AutoGenerateColumns="False" CanUserAddRows="True" CanUserDeleteRows="True">
                        <DataGrid.Columns>
                            <DataGridTextColumn Header="Property Name" CanUserReorder="False" CanUserSort="True" Width="20*" MinWidth="100" Binding="{Binding Name}"/>
                            <DataGridTextColumn Header="Property Value" CanUserReorder="False" Width="80*" Binding="{Binding Value}"/>
                        </DataGrid.Columns>
                    </DataGrid>
                </Grid>
            </Expander>
        </DockPanel>
    </Grid>
</UserControl>
